Methods
_createShortcut(prefixopt)
creates shortcut
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
prefix |
string |
<optional> |
prefix name |
_fetchFileNameFromUrl(url) → {string}
Fetches the file name from an URL
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | The URL |
Returns:
The file name
- Type
- string
algorithm(algorithm) → {Downloader}
Sets the algorithm which shall be used to verify the checksum
Parameters:
| Name | Type | Description |
|---|---|---|
algorithm |
string | The checksum algorithm (e.g. "SHA") |
Returns:
The Downloader object
- Type
- Downloader
algorithm(algorithm) → {Resource}
Sets the checksum algorithm
Parameters:
| Name | Type | Description |
|---|---|---|
algorithm |
string | The algorithm to verify the checksum (e.g. "SHA") |
Returns:
The Resource object
- Type
- Resource
application(application) → {AppResource}
Sets the application containing the resources
Parameters:
| Name | Type | Description |
|---|---|---|
application |
string | The application with the resource |
Returns:
The AppResource object
- Type
- AppResource
architecture() → {string}
Returns:
architecture ("x86" or "amd64")
- Type
- string
arguments(args) → {WineShortcut}
Sets the shortcut arguments
Parameters:
| Name | Type | Description |
|---|---|---|
args |
array | The shortcut arguments |
Returns:
The WineShortcut object
- Type
- WineShortcut
availableDistributions(architectureopt) → {Array.<string>}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
architecture |
string |
<optional> |
current architecture |
Returns:
- Type
- Array.<string>
availableVersions(distribution nameopt) → {Array.<string>}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
distribution name |
string |
<optional> |
current distribution |
Returns:
- Type
- Array.<string>
binPath(subCategoryopt, versionopt) → {string}
returns the path to the engine binary directory
if no parameters are given, the Wine version of the current prefix is used
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
subCategory |
string |
<optional> |
Wine sub-category |
version |
string |
<optional> |
Wine version |
Returns:
path to "wine" binary
- Type
- string
category(category) → {WineShortcut}
Sets the shortcut category
Parameters:
| Name | Type | Description |
|---|---|---|
category |
string | The shortcut category |
Returns:
The WineShortcut object
- Type
- WineShortcut
checksum(checksum) → {Downloader}
Sets the checksum
Parameters:
| Name | Type | Description |
|---|---|---|
checksum |
string | The checksum which shall be used to verify the download |
Returns:
The Downloader object
- Type
- Downloader
checksum(checksum) → {Resource}
Sets the checksum which shall be used to verify the resource
Parameters:
| Name | Type | Description |
|---|---|---|
checksum |
string | The checksum |
Returns:
The Resource object
- Type
- Resource
create() → {void}
Creates a new shortcut
Returns:
- Type
- void
create() → {Wine}
runs "wineboot"
Returns:
The Wine object
- Type
- Wine
description(description) → {WineShortcut}
Sets the shortcut description
Parameters:
| Name | Type | Description |
|---|---|---|
description |
string | The shortcut description |
Returns:
The WineShortcut object
- Type
- WineShortcut
directory(directory) → {Resource}
Sets the directory inside the resources directory where the Resource is stored
Parameters:
| Name | Type | Description |
|---|---|---|
directory |
string | The directory path |
Returns:
The Resource object
- Type
- Resource
dosConfigFile() → {string}
Fetch the prefix dosbox configuration file
Returns:
The dosbox configuration file path
- Type
- string
download(setupWizard) → {String}
Download the setup resources in the same directory, and returns the path of the .exe
Parameters:
| Name | Type | Description |
|---|---|---|
setupWizard |
SetupWizard | The setup wizard |
Returns:
The .exe file entry that can be used to continue the installation
- Type
- String
downloadFinished(wine) → {boolean}
Checks whether the software download has finished.
To get a valid result with this method `downloadStarted(wine)` needs to return `true` first
Parameters:
| Name | Type | Description |
|---|---|---|
wine |
Wine | The wine engine object |
Returns:
True if the download has finished, false otherwise
- Type
- boolean
downloadStarted(wine) → {boolean}
Checks whether the software download has started
Parameters:
| Name | Type | Description |
|---|---|---|
wine |
Wine | The wine engine object |
Returns:
True if the download has started, false otherwise
- Type
- boolean
environment(environment) → {WineShortcut}
Sets the shortcut environment variables
Parameters:
| Name | Type | Description |
|---|---|---|
environment |
string | The environment variables |
Returns:
The WineShortcut object
- Type
- WineShortcut
environment(environment) → {QuickScript}
set environment
Parameters:
| Name | Type | Description |
|---|---|---|
environment |
string | variables |
Returns:
QuickScript object
- Type
- QuickScript
executable(executable, args)
set executable
Parameters:
| Name | Type | Description |
|---|---|---|
executable |
executable without path (e.g. "Steam.exe") | |
args |
use array (e.g. ["-applaunch", 409160]) |
fontDirectory() → {string}
Returns:
font directory
- Type
- string
get() → {String}
Gets the content of the downloaded file
Returns:
The content of downloaded file
- Type
- String
get(resourceName) → {Resource}
Returns the searched resource
Parameters:
| Name | Type | Description |
|---|---|---|
resourceName |
string | The name of the resource |
Returns:
The found resource
- Type
- Resource
get() → {string}
Fetches the Resource and returns the path leading to the downloaded resource
Returns:
The path leading to the downloaded resource
- Type
- string
getContainer() → {string}
Returns the name of the container belonging to a shortcut
Returns:
The container name
- Type
- string
getSettings() → {object}
Fetch all prefix dosbox sttings
Returns:
All the settings
- Type
- object
gogSetupFileName(setupFileName) → {GogScript}
Sets one setup file name so that the script can fetch it from gog.com
Parameters:
| Name | Type | Description |
|---|---|---|
setupFileName |
string | The setup file name |
Returns:
This
- Type
- GogScript
gogSetupFileNames(setupFileNames) → {GogScript}
Sets the setup file(s) name so that the script can fetch it from gog.com
Parameters:
| Name | Type | Description |
|---|---|---|
setupFileNames |
Array.<string> | The setup file name(s) |
Returns:
This
- Type
- GogScript
headers(headers) → {Downloader}
Sets the http headers
Parameters:
| Name | Type | Description |
|---|---|---|
headers |
Object | The http headers |
Returns:
The Downloader object
- Type
- Downloader
isHdpi() → {boolean}
Fetches whether hdpi is enabled or not
Returns:
True if hdpi is enabled, false otherwise
- Type
- boolean
json() → {any}
Gets the content of the downloaded file and returns it as a JSON value
Returns:
The json value
- Type
- any
kill() → {Wine}
kill wine server
Returns:
- Type
- Wine
loginToGog(setupWizard) → {GogScript}
Presents a Gog.com login window to the user, login to its account and return a token that can be used later.
Stores the tocken in a parameter
Parameters:
| Name | Type | Description |
|---|---|---|
setupWizard |
SetupWizard | The setupWizard to use |
Returns:
This
- Type
- GogScript
message(message) → {Downloader}
Sets the download message text
Parameters:
| Name | Type | Description |
|---|---|---|
message |
string | The download message |
Returns:
The Downloader object
- Type
- Downloader
miniature(miniature) → {WineShortcut}
Sets the miniature for the shortcut
Parameters:
| Name | Type | Description |
|---|---|---|
miniature |
Array.<string> | URI | An array which specifies the application of which the miniature shall be used or URI of the miniature |
Returns:
The WineShortcut object
- Type
- WineShortcut
miniature(miniatureopt)
get/set miniature (for the installation and the shortcut)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
miniature |
URI |
<optional> |
path to the miniature file |
name(name) → {Resource}
Sets the resource name
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The name of the resource |
Returns:
The Resource object
- Type
- Resource
name(name) → {WineShortcut}
Sets the shortcut name
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The shortcut name |
Returns:
The WineShortcut object
- Type
- WineShortcut
of(shortcut) → {void}
Sets shortcut
Parameters:
| Name | Type | Description |
|---|---|---|
shortcut |
string | shortcut |
Returns:
- Type
- void
onlyIfUpdateAvailable(onlyIfUpdateAvailable) → {Downloader}
Specifies if the download shall be executed only if a newer version is available
Parameters:
| Name | Type | Description |
|---|---|---|
onlyIfUpdateAvailable |
boolean | true the download shall be executed only if a newer version is available |
Returns:
The Downloader object
- Type
- Downloader
prefix(prefix) → {WineShortcut}
Sets the shortcut prefix
Parameters:
| Name | Type | Description |
|---|---|---|
prefix |
string | The shortcut prefix |
Returns:
The WineShortcut object
- Type
- WineShortcut
prefix(prefixopt, distributionopt, architectureopt, versionopt) → {string|Wine}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
prefix |
string |
<optional> |
|
distribution |
string |
<optional> |
|
architecture |
string |
<optional> |
|
version |
string |
<optional> |
Returns:
- Type
- string | Wine
prefixDirectory() → {string}
returns prefix directory
Returns:
- Type
- string
programFiles() → {string}
Returns:
name of "Program Files"
- Type
- string
run(userArguments) → {void}
Runs a shortcut with the given user arguments
Parameters:
| Name | Type | Description |
|---|---|---|
userArguments |
array | The user arguments |
Returns:
- Type
- void
run(executable, argsopt, workingDirectoryopt, captureOutputopt, waitopt, userDataopt) → {String}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
executable |
string | |||
args |
array |
<optional> |
[] | |
workingDirectory |
string |
<optional> |
working container | |
captureOutput |
boolean |
<optional> |
false | |
wait |
boolean |
<optional> |
false | |
userData |
map |
<optional> |
empty |
Returns:
output
- Type
- String
runInsidePrefix(executable, argsopt, waitopt)
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
executable |
string | |||
args |
array |
<optional> |
[] | |
wait |
boolean |
<optional> |
false |
search(search) → {WineShortcut}
Sets the executable which shall be used
Parameters:
| Name | Type | Description |
|---|---|---|
search |
string | The executable name |
Returns:
The WineShortcut object
- Type
- WineShortcut
setupPathInsidePrefix(setupPath) → {ZipScript}
If setupPath is provided, ZipScript will try to execute the .exe when the archive is extracted
Parameters:
| Name | Type | Description |
|---|---|---|
setupPath |
string | path of the setup in |
Returns:
This
- Type
- ZipScript
stop() → {void}
Stops the running shortcut
Returns:
- Type
- void
system32directory() → {string}
Returns:
system32 directory
- Type
- string
system64directory() → {string}
Returns:
system64 directory
- Type
- string
to(localDestination) → {Downloader}
Sets the download destination
Parameters:
| Name | Type | Description |
|---|---|---|
localDestination |
string | The destination of the download. If it is a directory, the file will be placed inside |
Returns:
The Downloader object
- Type
- Downloader
trustLevel(trustLevel) → {WineShortcut}
Sets the trust level
Parameters:
| Name | Type | Description |
|---|---|---|
trustLevel |
string | The trust level |
Returns:
The WineShortcut object
- Type
- WineShortcut
trustLevel(trustlevel) → {QuickScript}
set trust level
Parameters:
| Name | Type | Description |
|---|---|---|
trustlevel |
string |
Returns:
QuickScript object
- Type
- QuickScript
type(type) → {WineShortcut}
Sets the shortcut type
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string | The shortcut type |
Returns:
The WineShortcut object
- Type
- WineShortcut
uninstall(name) → {bool}
uninstall application
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | of the application which shall be uninstalled |
Returns:
true if an application has been uninstalled, false otherwise
- Type
- bool
uninstall() → {void}
Uninstalls the shortcut
Returns:
- Type
- void
url(url) → {Downloader}
Sets the URL which shall be used for the download
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | The URL |
Returns:
The Downloader object
- Type
- Downloader
url(url) → {Resource}
Sets the resource URL
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | The URL |
Returns:
The Resource object
- Type
- Resource
wait() → {Wine}
wait until wineserver finishes
Returns:
- Type
- Wine
winepath(pathopt) → {String}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
path |
String |
<optional> |
Returns:
- Type
- String
wineServer(wineserver)
executes wineserver in current prefix
Parameters:
| Name | Type | Description |
|---|---|---|
wineserver |
string | parameter |
withApplicationWindowsVersion(application, os) → {WindowsVersion}
Specifies the windows version for a given application
Parameters:
| Name | Type | Description |
|---|---|---|
application |
string | The application executable |
os |
string | The windows version |
Returns:
This
- Type
- WindowsVersion
withCpuCycles(cpuCycles) → {Dosbox}
Sets CPU cycles in the current prefix
https://www.dosbox.com/wiki/dosbox.conf#.5Bcpu.5D
Parameters:
| Name | Type | Description |
|---|---|---|
cpuCycles |
int | (example: max 95% limit 33000) |
Returns:
This
- Type
- Dosbox
withDimensions(width, height) → {VirtualDesktop}
Specifies the dimensions of the virtual desktop
Parameters:
| Name | Type | Description |
|---|---|---|
width |
number | width of virtual desktop (in px) |
height |
number | height of virtual desktop (in px) |
Returns:
This
- Type
- VirtualDesktop
withDriver(driver) → {SoundDriver}
Specifies the used sound driver
Parameters:
| Name | Type | Description |
|---|---|---|
driver |
string | alsa or pulse |
Returns:
This
- Type
- SoundDriver
withExtension(extension) → {NativeApplication}
Specifies the file extension
Parameters:
| Name | Type | Description |
|---|---|---|
extension |
string | The file extension (pdf, txt, rtf) |
Returns:
This
- Type
- NativeApplication
withHdpi(hdpi) → {HDPI}
Specifies whether hdpi should be enabled or not
Parameters:
| Name | Type | Description |
|---|---|---|
hdpi |
boolean | true if hdpi shall be enabled |
Returns:
This
- Type
- HDPI
withManaged(managed) → {Managed}
Specifies the global managed state
Parameters:
| Name | Type | Description |
|---|---|---|
managed |
boolean | True if it shall be managed |
Returns:
This
- Type
- Managed
withManagedApplication(application, managed) → {Managed}
Specifies the managed state for a given application
Parameters:
| Name | Type | Description |
|---|---|---|
application |
string | The application |
managed |
boolean | True if the application shall be managed |
Returns:
This
- Type
- Managed
withMemSize(memSize) → {Dosbox}
Sets dosbox_memsize parameter in the current prefix
https://www.dosbox.com/wiki/dosbox.conf#.5Bdosbox.5D
Parameters:
| Name | Type | Description |
|---|---|---|
memSize |
int | The memory size |
Returns:
This
- Type
- Dosbox
withMode(mode) → {FontSmoothing}
Specifies the used font smoothing mode
Parameters:
| Name | Type | Description |
|---|---|---|
mode |
string | "RGB", "BGR" or "Gray Scale" |
Returns:
This
- Type
- FontSmoothing
withMode(mode) → {GLSL}
Specifies the mode
Parameters:
| Name | Type | Description |
|---|---|---|
mode |
string | enabled or disabled |
Returns:
This
- Type
- GLSL
withMode(mode) → {TakeFocus}
Specifies the mode
Parameters:
| Name | Type | Description |
|---|---|---|
mode |
string | "Y" or "N" |
Returns:
This
- Type
- TakeFocus
withMode(mode) → {DirectDrawRenderer}
Selects the used direct draw mode (either gdi or opengl)
Parameters:
| Name | Type | Description |
|---|---|---|
mode |
string | gdi or opengl |
Returns:
This
- Type
- DirectDrawRenderer
withRenderAspect(renderAspect) → {Dosbox}
Sets render_aspect parameter in the current prefix
https://www.dosbox.com/wiki/dosbox.conf#.5Brender.5D
Parameters:
| Name | Type | Description |
|---|---|---|
renderAspect |
boolean | The render aspect |
Returns:
This
- Type
- Dosbox
withRenderFrameSkip(renderFrameSkip) → {Dosbox}
Sets render_frameskip parameter in the current prefix
https://www.dosbox.com/wiki/dosbox.conf#.5Brender.5D
Parameters:
| Name | Type | Description |
|---|---|---|
renderFrameSkip |
int | The render frameskip |
Returns:
This
- Type
- Dosbox
withScript(command) → {PlainInstaller}
Sets the installation script consisting of a lambda function
Parameters:
| Name | Type | Description |
|---|---|---|
command |
function | The installation command |
Returns:
The PlainInstaller object
- Type
- PlainInstaller
withSetting(key, value) → {Dosbox}
Sets a dosbox setting
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | The key of the setting (example dosbox_memsize) |
value |
any | The value to be set |
Returns:
This
- Type
- Dosbox
withVersion(major, minor) → {OpenGL}
Specifies the major and minor versions
Parameters:
| Name | Type | Description |
|---|---|---|
major |
number | The major version |
minor |
number | The minor version |
Returns:
This
- Type
- OpenGL
withWindowsVersion(version, servicePack) → {WindowsVersion}
Specifies the default windows version
Parameters:
| Name | Type | Description |
|---|---|---|
version |
string | win7, vista, win2003, winxp, win2k, winnt, winme, win98, win95, win31 |
servicePack |
string | e.g. sp3 |
Returns:
This
- Type
- WindowsVersion
wizard(wizard) → {Resource}
Sets the setup wizard
Parameters:
| Name | Type | Description |
|---|---|---|
wizard |
SetupWizard | The setup wizard |
Returns:
The Resource object
- Type
- Resource
wizard(wizardopt) → {SetupWizard|Wine}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
wizard |
SetupWizard |
<optional> |
Returns:
- Type
- SetupWizard | Wine
wizard(wizard) → {Downloader}
Sets the setup wizard
Parameters:
| Name | Type | Description |
|---|---|---|
wizard |
SetupWizard | The setup wizard |
Returns:
The Downloader object
- Type
- Downloader